<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="../base.jsp" %>  

<s:if test="#attr.productId!=null">
	<s:set var="productId1" value="#attr.productId"></s:set>
</s:if>
<s:if test="#attr.productId==null">
	<s:set var="productId" value="#parameters.productId[0]"></s:set>
</s:if>
<sys:genericTag4o 
	id="propTypeDtoList" 
	methodName="queryPropTypeList" 
	className="com.wxy.controller.taglib.ProductTag">
	<sys:columnTag columnName="productId" columnValue="${attr.productId}"/>
</sys:genericTag4o>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>	
<link href="../css/main.css" rel="stylesheet" type="text/css" >
<script type="text/javascript" src="../../js/jquery-1.8.0.min.js"></script>
</head>
<body class="font14">

	<table width="100%">
		<tr>
			<td valign="top"  width="200px">
				<%@include file="productAddStep1.jsp" %>
				<script type="text/javascript">
				$(function(){
					$("#productAddStep_2>a").css("color","red");
				});
				$("#productAddStep_2>a").css("color","red");
				</script>				
			</td>
			<td valign="top"   width="600px">
				<s:if test="#attr.result!=null">
					<table class="table1" width="100%" cellpadding="0" cellspacing="0" >	
						<thead>
							<tr style="background-color: #DEE9FB; color: #15428B;">
								<td align="center">
									<strong>操作结果</strong>
								</td>
							</tr>
						</thead> 
						<tr>
							<td><font color="red"><s:property value="#attr.result"/></font>	</td>
						</tr>
					</table>
					<br/> 
				</s:if> 			
				<s:form action="product!addProperty.action" method="post" namespace="/admin123/product" theme="simple">
				<table class="table1" align="center" width="100%" cellpadding="0" cellspacing="0">
					<thead>
						<tr style="background-color: #DEE9FB; color: #15428B;">
							<td colspan="2" align="center">
								<strong>商品属性特征管理</strong>
								<input type="hidden" name="productId" value="${attr.productId}">
							</td>
						</tr>
					</thead>
					<tbody>
						<s:iterator value="#attr.propTypeDtoList" status="st">
						<tr> 
							<td width="80px">
								<input type="checkbox" name="typeIdCheckbox" value="${attr.typeId}"/>
								<s:property value="typeName"/>
							</td>
							<td>
							
								<s:iterator value="propValueList">
								<div style="width: 120px; float: left;">
									<input type="radio" name="radio_${attr.typeId}" value="${attr.valueId}"/>
									<s:property value="valueName"/>
								</div>									
								</s:iterator>
							
							</td>
						</tr>
						</s:iterator>
					</tbody>
					<tfoot style="border-top: 1px solid #DEE9FB;">
						<tr>
							<td colspan="2" align="center" style="border-top: 1px solid #DEE9FB;">
								<input type="submit" value="添加">
							</td>
						</tr>
					</tfoot>
				</table>
			    </s:form>
			</td>
			<td valign="top" >
				<!-- test user param; real user: attr -->
				<jsp:include page="productInfo.jsp">
					<jsp:param name="productId" value="${attr.productId}"/>
				</jsp:include>
			</td>
		</tr>
	</table>
	

</body>
</html>